<ion-view view-title="商品列表" class="merchandise home-view">
    <ion-header-bar class="bar-subheader">
        <search-bar class="search" style="margin: 0 55px 0 5px" placeholder="请输入料号\料名进行查询"
                    search="data.search"></search-bar>
        <div class="shopCar" ng-click="goOrders()">
            <img ng-src="{{'img/shopCar.png'}}">
            <span class="merNum">{{data.merNum}}</span>
        </div>
    </ion-header-bar>
    <ion-content class="my-content">
        <ion-refresher on-refresh="doRefresh()" pulling-text="下拉刷新..." refreshing-text="刷新中!"
                       refreshing-icon="ion-loading-c">
        </ion-refresher>
        <div class="list merchandise-list" style="margin-bottom: 0;">
            <div class="item item-avatar item-merchandise item-checkbox" ng-repeat="merchandise in data.merchandise">
                <img ng-src="{{merchandise.Picture || 'img/default.png'}}">

                <div class="mid-merchandise-msg">
                    <div class="merchandiseName">{{merchandise.Name}}</div>
                    <div class="merchandiseSpec">{{"规格:"+merchandise.Spec}}</div>
                    <div class="merchandisePrice">
                    {{merchandise.CurrencySymbols?merchandise.CurrencySymbols:'￥'}}
                        :{{merchandise.Price}}
                        元/{{merchandise.Unit ? merchandise.Unit :'无单位'}}
                    </div>
                </div>
                <div class="right-merchandise-msg">
                    <!-- <img class="addShopCar" ng-src="{{'img/addShopCar.png'}}"
                         ng-click="addMerchandise(merchandise)"> -->
                    <label class="checkbox addShopCar">
                        <input type="checkbox" ng-model="merchandise.add" ng-change="addMerchandise(merchandise.add,merchandise)">
                    </label>
                </div>
            </div>
            
        </div>
        <ion-infinite-scroll ng-if="data.scrolled" on-infinite="loadMore()"  
        distance="5%">
            <ion-spinner></ion-spinner>
        </ion-infinite-scroll>
        <div class="noMoreMsg" ng-show="data.loadOver">亲，没有更多数据了O(∩_∩)O
        </div>
    </ion-content>
</ion-view>